import java.util.Hashtable;

public class MSDCache {
	Hashtable<String, ConnectionDetails> cache = new Hashtable<String, ConnectionDetails>();
	
	public MSDCache()
	{
		this.cache = new Hashtable<String, ConnectionDetails>();
	}
	
	public void addKeywordToCache(String keyword, ConnectionDetails connDetails){
		cache.put(keyword, connDetails);
	}
	public boolean keywordIsInCache(String keyword){
		return cache.containsKey(keyword);
	}
	public ConnectionDetails getConnectionFromCache(String keyword){
		return cache.get(keyword);
	}
	public void removeKeywordFromCache(String keyword){
		cache.remove(keyword);
	}
	public void clearCache(){
		cache.clear();
	}
}
